How to call functions with chat models
https://cookbook.openai.com/examples/how_to_call_functions_with_chat_models
https://github.com/openai/openai-cookbook/blob/0d1436b8d9b858c220d708a446a09eef54be61b0/examples/How_to_call_functions_with_chat_models.ipynb
This notebook covers how to use the Chat Completions API in combination with external functions to extend the capabilities of GPT models.
2つのセクション
How to generate function arguments:
Specify a set of functions and use the API to generate function arguments.
How to call functions with model generated arguments:
Close the loop by actually executing functions with model generated arguments.
依存関係
Tenacity
termcolor
openaiは使っていない(requestsを使っている。謎)
天気予報の例
DB(sqlite)を使う例